package cn.andrewlu.weexshell.ui;

import android.support.v4.app.Fragment;

import cn.andrewlu.weexshell.beans.NavData;

/**
 * Created by andrewlu on 2017/6/4.
 * 主Fragment, 用于整个页面框架的基类.由一个WeexAPP管理类进行配置解析,最后得出一个通用的MainFragment.实际的导航UI由解析者决定.
 * 具体的导航UI对外隐藏.
 */

public abstract class NavFragment extends RootFragment {
    protected NavData mNavData;

    public void setNavData(NavData nav) {
        this.mNavData = nav;
    }

    public NavData getNavData() {
        return mNavData;
    }

    protected void attachFragment(int containerId, Fragment f) {
        getChildFragmentManager().beginTransaction()
                .add(containerId, f)
                .commitAllowingStateLoss();
    }
}
